function validate_email(e){

	var email=document.getElementById("txtemail").value;
	var email_re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
	if((email_re.test(email))!=true)
	{
		document.getElementById("chkemail").innerHTML="*";
		document.getElementById("vsummary").innerHTML="invalid email";
		e.preventDefault();
	} 
}
function validate_pw(e){
	var pass=document.getElementById("txtpw").value;
	if(pass.length<6)
	{
		document.getElementById("chkpw").innerHTML="*";
		document.getElementById("vsummary").innerHTML="invalid password";
		
		e.preventDefault();
	}
}
function clearem(){
	document.getElementById("chkemail").innerHTML="";
}
function clearpw(){
	document.getElementById("chkpw").innerHTML="";
}
function validate_empty(evt){
	var email=document.getElementById("txtemail").value;
	var pass=document.getElementById("txtpw").value;
	if(email=="" && pass=="")
	{
		document.getElementById("vsummary").innerHTML="email and password cannot be empty";
	}
	else if(email=="")
	{
		document.getElementById("vsummary").innerHTML="email cannot be empty";
	}
	else if(pass=="")
	{
		document.getElementById("vsummary").innerHTML="password cannot be empty";
		evt.preventDefault();
	}
}



function open_sessioninfo(){
	document.getElementById("ahcontentpnl").innerHTML='<object type="type/html" data="ses_info.html" ></object>';

}
/*
function funSessStatus(){
	var r=document.getElementById("SessStatus").value;
	if(var=="Not Available"){
		document.getElementById("divAcceptReject").style.display="hidden";	
	}
}*/

function funUserStatusAccept(){
//alert("A");
document.getElementById("btnaccept").setAttribute("class", "btn btn-success");
document.getElementById("btnreject").setAttribute("class", "btn btn-info");
var sesnm=document.getElementById("sesnm1").innerHTML;
document.getElementById("AcceptedMSG").innerHTML="You have been confirmed for "+sesnm;
setTimeout(function(){ document.getElementById("AcceptedMSG").innerHTML=""; }, 3000);
document.getElementById("AcceptedMSG").innerHTML="You have been confirmed for "+sesnm;
}

function funUserStatusReject(){
//alert("A");
document.getElementById("btnreject").setAttribute("class", "btn btn-danger");
document.getElementById("btnaccept").setAttribute("class", "btn btn-info");
}
